package com.lmt.controller;

import com.lmt.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: TODO
 * @Author: Amazing
 * @Date: 2022/7/27 20:14
 * @Version: 1.0
 */
@RestController
public class UserController {

    @Value("${server.port}")
    private Long port;
    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id) {
        return User.builder().id(id).name("张三").intro("法外狂徒" + port).build();
    }
}
